package edu.scau.payment.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@Schema(name = "支付domian")
public class Payment implements Serializable {
    private static final long serialVersionUID = 1L;
    @Schema(name = "id", description = "自增id", type = "long")
    private long id;
    @Schema(name = "paymentId", description = "标识", type = "String")
    private String paymentId;
    @Schema(name = "orderId", description = "关联的订单编号", type = "String")
    private String orderId;
    @Schema(name = "strategyId", description = "优惠策略id", type = "String")
    private String strategyId;
    @Schema(name = "amount", description = "支付金额", type = "double")
    private double amount;
    @Schema(name = "paymentMethod", description = "支付方式", type = "int")
    private int paymentMethod;
    @Schema(name = "discountAmount", description = "优惠后金额", type = "double")
    private double discountAmount;
    @Schema(name = "payTime",description = "支付时间", type = "Date")
    private Date payTime;
    @Schema(name = "tradeId", description = "支付返回的支付流水id", type = "String")
    private String tradeId;
//    @Schema(name = "status", description = "支付状态", type = "int")
//    private int status;
    @Schema(name = "isDeleted", description = "删除标记",type = "int")
    private int isDeleted;
    @Schema(name = "createTime",description = "创建时间:不返回该数据", type = "Date")
    private Date createTime;
    @Schema(name = "createBy",description = "创建者:不返回该数据", type = "String")
    private String createBy;
    @Schema(name = "updateTime",description = "更新时间:不返回该数据", type = "Date")
    private Date updateTime;
    @Schema(name = "updateBy",description = "更新者:不返回该数据", type = "String")
    private String updateBy;

    public Payment(String paymentId, String strategyId, double amount, int paymentMethod, double discountAmount, Date createTime, String createBy, Date updateTime, String updateBy) {
        this.paymentId = paymentId;
        this.strategyId = strategyId;
        this.amount = amount;
        this.paymentMethod = paymentMethod;
        this.discountAmount = discountAmount;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
    }

    public Payment() {
    }
}
